import {createRouter, createWebHashHistory, RouteRecordRaw} from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'home',
        component: HomeView,
        redirect: '/main',
        children: [
            {
                path: '/main',
                name: 'main',
                component: () => import('@/views/pages/MainPage.vue')
            },
            {
                path: '/monitor',
                name: 'monitor',
                component: () => import('@/views/pages/ServerMonitorPage.vue')
            },
            {
                path: '/routine',
                name: 'routine',
                component: () => import('@/views/pages/RoutinePage.vue')
            },
            {
                path: '/gold',
                name: 'gold',
                component: () => import('@/views/pages/GoldPage.vue')
            },
            {
                path: '/notice',
                name: 'notice',
                component: () => import('@/views/pages/NoticePage.vue')
            },
            {
                path: '/topic',
                name: 'topic',
                component: () => import('@/views/pages/TopicPage.vue')
            },
            {
                path: '/meet',
                name: 'meet',
                component: () => import('@/views/pages/MeetPage.vue')
            },
            {
                path: '/meetSearch',
                name: 'meetSearch',
                component: () => import('@/views/pages/MeetSearchPage.vue')
            },
            {
                path: '/flower',
                name: 'flower',
                component: () => import('@/views/pages/FlowerPage.vue')
            },
            {
                path: '/implements',
                name: 'implements',
                component: () => import('@/views/pages/ImplementsPage.vue')
            },
            {
                path: '/achievement',
                name: 'achievement',
                component: () => import('@/views/pages/AchievementPage.vue')
            },
            {
                path: '/setting',
                name: 'setting',
                component: () => import('@/views/pages/SettingPage.vue')
            },
            {
                path: '/copy',
                name: 'copy',
                component: () => import('@/views/pages/CopyPage.vue')
            },
            {
                path: '/task',
                name: 'task',
                component: () => import('@/views/pages/TaskPage.vue')
            }
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(process.env.BASE_URL),
    routes
})

export default router
